home *** CD-ROM | disk | FTP | other *** search
/ Die Speccy' 97 / Die Speccy' 97.iso / amiga_system / the_aminet / util / batch / uninstl.lha / Disinstall < prev    next >
Text File  |  1992-09-02  |  5KB  |  147 lines

  1. FailAt 21
  2. Set Echo OFF
  3. Resident >NIL: C:Search
  4. Resident >NIL: C:Delete
  5.  
  6. Echo "Uninstaller 2.0 (C) 10/1995, T.dMan. AmigaOS 2.1 or higher."
  7. Echo "Version 1.0 by Luk and T.dMan."
  8. Echo "To quit the program, press Ctrl+D."
  9. Echo ""
  10.  
  11. Echo "Scanning..."
  12.  
  13. Lock >NIL: SYS: ON
  14.  
  15. NReq
  16.  
  17. Echo "Processing S:"
  18. If `Count S:` NOT Eq $Cnts
  19.   List All Quick Nohead S: > RAM:New1 Lformat "If *"*`Search RAM:Old1 *"%n*" Nonum*`*" Eq *"*" *nEcho >> RAM:nfiles *"NEW: %f%n*" *nEndIf"
  20.   Execute RAM:New1
  21. Endif
  22.  
  23. Echo "Processing C:"
  24. If `Count C:` NOT Eq $Cntc
  25.   List All Quick Nohead C: > RAM:New2 Lformat "If *"*`Search RAM:Old2 *"%n*" Nonum*`*" Eq *"*" *nEcho >> RAM:nfiles *"NEW: %f%n*" *nEndIf"
  26.   Execute RAM:New2
  27. Endif
  28.  
  29. Echo "Processing L:"
  30. If `Count L:` NOT Eq $Cntl
  31.   List All Quick Nohead L: > RAM:New3 Lformat "If *"*`Search RAM:Old3 *"%n*" Nonum*`*" Eq *"*" *nEcho >> RAM:nfiles *"NEW: %f%n*" *nEndIf"
  32.   Execute RAM:New3
  33. Endif
  34.  
  35. Echo "Processing Devs:"
  36. If `Count Devs:` NOT Eq $Cntd
  37.   List All Quick Nohead Devs: > RAM:New4 Lformat "If *"*`Search RAM:Old4 *"%n*" Nonum*`*" Eq *"*" *nEcho >> RAM:nfiles *"NEW: %f%n*" *nEndIf"
  38.   Execute RAM:New4
  39. Endif
  40.  
  41. Echo "Processing Libs:"
  42. If `Count Libs:` NOT Eq $Cntli
  43.   List All Quick Nohead Libs: > RAM:New5 Lformat "If *"*`Search RAM:Old5 *"%n*" Nonum*`*" Eq *"*" *nEcho >> RAM:nfiles *"NEW: %f%n*" *nEndIf"
  44.   Execute RAM:New5
  45. Endif
  46.  
  47. Echo "Processing Locale:"
  48. If `Count Locale:` NOT Eq $Cntlo
  49.   List All Quick Nohead Locale: > RAM:New6 Lformat "If *"*`Search RAM:Old6 *"%n*" Nonum*`*" Eq *"*" *nEcho >> RAM:nfiles *"NEW: %f%n*" *nEndIf"
  50.   Execute RAM:New6
  51. Endif
  52.  
  53. Echo "Processing SYS:Prefs"
  54. If `Count SYS:Prefs` NOT Eq $Cntp
  55.   List All Quick Nohead SYS:Prefs > RAM:New7 Lformat "If *"*`Search RAM:Old7 *"%n*" Nonum*`*" Eq *"*" *nEcho >> RAM:nfiles *"NEW: %f%n*" *nEndIf"
  56.   Execute RAM:New7
  57. Endif
  58.  
  59. Echo "Processing SYS:Tools"
  60. If `Count SYS:Tools` NOT Eq $Cntt
  61.   List All Quick Nohead SYS:Tools > RAM:New8 Lformat "If *"*`Search RAM:Old8 *"%n*" Nonum*`*" Eq *"*" *nEcho >> RAM:nfiles *"NEW: %f%n*" *nEndIf"
  62.   Execute RAM:New8
  63. Endif
  64.  
  65. Echo "Processing SYS:Utilities"
  66. If `Count SYS:Utilities` NOT Eq $Cntu
  67.   List All Quick Nohead SYS:Utilities > RAM:New9 Lformat "If *"*`Search RAM:Old9 *"%n*" Nonum*`*" Eq *"*" *nEcho >> RAM:nfiles *"NEW: %f%n*" *nEndIf"
  68.   Execute RAM:New9
  69. Endif
  70.  
  71. Echo "Processing SYS:System"
  72. If `Count SYS:System` NOT Eq $Cntsy
  73.   List All Quick Nohead SYS:System > RAM:New10 Lformat "If *"*`Search RAM:Old10 *"%n*" Nonum*`*" Eq *"*" *nEcho >> RAM:nfiles *"NEW: %f%n*" *nEndIf"
  74.   Execute RAM:New10
  75. Endif
  76.  
  77. Echo "Processing SYS:WBStartup"
  78. If `Count SYS:WBStartup` NOT Eq $Cntw
  79.   List All Quick Nohead SYS:WBStartup > RAM:New11 Lformat "If *"*`Search RAM:Old11 *"%n*" Nonum*`*" Eq *"*" *nEcho >> RAM:nfiles *"NEW: %f%n*" *nEndIf"
  80.   Execute RAM:New11
  81. Endif
  82.  
  83. Echo "Processing SYS:Classes"
  84. If `Count SYS:Classes` NOT Eq $Cntcl
  85.   List All Quick Nohead SYS:Classes > RAM:New12 Lformat "If *"*`Search RAM:Old12 *"%n*" Nonum*`*" Eq *"*" *nEcho >> RAM:nfiles *"NEW: %f%n*" *nEndIf"
  86.   Execute RAM:New12
  87. Endif
  88.  
  89. Echo "Processing SYS:Storage"
  90. If `Count SYS:Storage` NOT Eq $Cntst
  91.   List All Quick Nohead SYS:Storage > RAM:New13 Lformat "If *"*`Search RAM:Old13 *"%n*" Nonum*`*" Eq *"*" *nEcho >> RAM:nfiles *"NEW: %f%n*" *nEndIf"
  92.   Execute RAM:New13
  93. Endif
  94.  
  95. Lock >NIL: SYS:
  96.  
  97. Echo ""
  98.  
  99. Echo "If $sseq NOT Eq *"`List Lformat %l S:Startup-sequence`*" *nEcho *"The file S:Startup-sequence has been modified *" *nEcho *"You can vision a copy of the original NOW in RAM: *" *nAsk *"Want to have the original back [Y/N or RETURN]?*" *nIf Warn *nCopy >NIL: RAM:Startup-sequence S: *nEndif *nElse *nEcho *"The Startup-sequence has not been modified*" *nEndif" >RAM:Kickfile
  100. Execute RAM:Kickfile
  101.  
  102. Echo "If $usst NOT Eq *"`List Lformat %l S:User-startup`*" *nEcho *"The file S:User-startup has been modified*" *nEcho *"You can vision a copy of the original NOW in RAM: *" *nAsk *"Want to have the original back [Y/N or RETURN]?*" *nIf Warn *nIf Exists RAM:User-startup *nCopy >NIL: RAM:User-startup S: *nElse *nDelete FORCE >NIL: S:User-startup *nEndif *nEndif *nElse *nEcho *"The User-startup has not been modified*" *nEndif" >RAM:Kickfile
  103. Execute RAM:Kickfile
  104.  
  105. Echo ""
  106. Echo "New files are:"
  107. If Exists RAM:nfiles
  108.   Type RAM:nfiles
  109.   Echo ""
  110.   Ask "Want to delete these files [Y/N or RETURN]? "
  111.   If Warn
  112.     Alias NEW: "DELETE >NIL: ALL FORCE"
  113.     Execute RAM:nfiles
  114.     Echo "Files deleted. OK."
  115.   Else
  116.     Echo ""
  117.     Ask "Want to save the log file [Y/N or RETURN]?"
  118.     If Warn
  119.       Echo "The program will create a directory in which to save the log"
  120.       Echo "file and the *"original*" startup-sequence and user-startup"
  121.       Wait 2
  122.       Requestfile TITLE="Choose dir's name.." >Ram:ENV/SDir
  123.       Echo ""
  124.       Makedir `getenv SDir`
  125.       Echo "Copying log into " $SDir
  126.       Run >NIL: Copy RAM:nfiles $SDir
  127.       Run >NIL: Copy RAM:Startup-sequence $SDir
  128.       Run >NIL: Copy RAM:User-startup $SDir
  129.     EndIf
  130.   EndIf
  131. Else
  132.   Echo "... (no files)"
  133. EndIf
  134.  
  135. Echo ""
  136. Echo "See ya soon..."
  137. Echo ""
  138.  
  139. Delete >NIL: RAM:Startup-sequence RAM:User-startup RAM:nfiles RAM:Kickfile
  140. Delete >NIL: RAM:Old#?
  141. Delete >NIL: RAM:New#?
  142. Delete >NIL: RAM:Env/usst RAM:Env/sseq RAM:Env/SDir
  143. Delete >NIL: RAM:Env/Cnt#?
  144.  
  145. Resident >NIL: List REMOVE
  146. Resident >NIL: Search REMOVE
  147. Resident >NIL: Delete REMOVE